package cn.itguy.mobileguard.activity;

import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.text.SpannableStringBuilder;
import android.text.style.TextAppearanceSpan;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import cn.itguy.mobileguard.R;

public class AboutActivity extends BaseActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.activity_about);

		Button btn_back = (Button) findViewById(R.id.btn_left);
		btn_back.setVisibility(View.VISIBLE);
		btn_back.setOnClickListener(this);

		((TextView) findViewById(R.id.tv_title))
				.setText(R.string.titleText_about);

//		String version = "***";
//		try {
//			version = getPackageManager().getPackageInfo(getPackageName(),
//					PackageManager.GET_ACTIVITIES).versionName;
//		} catch (NameNotFoundException e) {
//			e.printStackTrace();
//		}
		SpannableStringBuilder builder = new SpannableStringBuilder(getString(
				R.string.contentText_app_info, ""));
		builder.setSpan(new TextAppearanceSpan(this,
				R.style.TextViewTheme_Small), 0, builder.length(),
				SpannableStringBuilder.SPAN_EXCLUSIVE_EXCLUSIVE);
		((TextView) findViewById(R.id.tv_logo)).append(builder);

	}

	@Override
	public void onClick(View v) {
		finish();
	}

}
